<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>易买网 - 首页</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>
    <script type="text/javascript" src="/scripts/function.js"></script>
</head>

<body>
<%@ include file="/WEB-INF/common/head.jsp" %>
<div id="position" class="wrap">
    您现在的位置：<a href="/index">易买网</a> &gt; 图书音像 &gt; 图书
</div>
<div id="main" class="wrap">
    <%@ include file="/WEB-INF/common/left.jsp" %>
    <div class="main">
        <div class="product-list">
            <h2>全部商品</h2>
            <ul class="product clearfix">
                <c:forEach items="${productPage.records}" var="product">
                    <li>
                        <dl>
                            <dt><a href="/product/product_info?id=${product.id}"><img
                                    src="${product.fileName}"/></a></dt>
                            <dd class="title"><a
                                    href="/product/product_info?id=${product.id}">${product.description}</a>
                            </dd>
                            <dd class="price">${product.price}</dd>
                        </dl>
                    </li>
                </c:forEach>
            </ul>
            <div class="pager">
                <ul class="clearfix">
                    <li><a href="/product/category?current=${productPage.hasPrevious()?productPage.current-1:1}">上一页</a>
                    </li>
                    <c:forEach var="index" begin="1" end="${totalPage}" step="1">
                        <li class="current"><a href="/front/index?current=${index}">${index}</a></li>
                    </c:forEach>
                    <li>
                        <a href="/product/category?current=${productPage.hasNext()?productPage.current+1:totalPage}">下一页</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<%@ include file="/WEB-INF/common/footer.jsp" %>
</body>
</html>
